package cn.tedu.shoot;

import java.util.Random;

// 小飞机
public class Airplane extends FlyingObject implements Enemy{
  
	private int speed =2;//移动速度
	
	public Airplane(){
	    image =ShootGame.airplane;
	    width =image.getWidth();
	    height =image.getHeight();
	    Random rand =new Random();
	    x =rand.nextInt(ShootGame.WIDTH-this.width);
	    y =-this.height;
    }
	
	public int getScore(){
		return 5;
	}
/** 重写step 移动一步*/	
	public void step(){
		y+= speed;
	}
/** 重写   是否越界*/
	public boolean outOfBounds(){
		return this.y>=ShootGame.HEIGHT;
	}

}
